package com.spcloud.lee.thread;

import java.util.concurrent.Executor;
import java.util.concurrent.Executors;

public class ThreadDemo1 {

    public static void main(String[] args) throws InterruptedException {
        long start = System.currentTimeMillis();
        Thread t1 = new Thread() {
            @Override
            public void run() {
                for (int i = 0; i < 200; i++) {
                    System.out.println(i);
                }
            }
        };
        Thread t2 = new Thread() {
            @Override
            public void run() {
                for (int i = 0; i < 200; i++) {
                    System.out.println((char)i);
                }
            }
        };
        t1.start();
        t2.start();

        t1.join();
        t2.join();
        long end = System.currentTimeMillis() - start;
        System.out.println("End-----------:" + end);
    }
}
